<template>
  <view class="container">
    <view class="title">
      <view class="title1"> 请填写邮箱地址</view>
      <view class="sub_title">
        你所申请导出的账单文件将发送到指定的接收邮箱
      </view>
    </view>
    <view class="choose_box">
      <view class="item1">
        <view class="right">
          <view class="type_title">邮箱地址</view>
        </view>
        <uni-easyinput
          v-model="value"
          :styles="styles"
          color="#000"
          :clearable="false"
          :placeholderStyle="placeholderStyle"
          placeholder="请输入邮箱地址"
        ></uni-easyinput>
        <view class="email_box" v-if="value">
          <view class="emit_item">{{ value }}@qq.com</view>
          <view class="emit_item">{{ value }}@163.com</view>
          <view class="emit_item">{{ value }}@126.com</view>
          <view class="emit_item">{{ value }}@sohu.com</view>
          <view class="emit_item">{{ value }}@sina.com</view>
        </view>
      </view>
    </view>
    <view class="btn3" :disabled="!value">下一步</view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      // type: null,
      value: "",
      type1: "default",
      type2: "default",
      type3: "default",
      placeholderStyle: "color:#999;font-size:16px",
      styles: {
        border: "none",
        marginLeft: "10px",
        fontSize: "16px",
      },
    };
  },
  onLoad(options) {
    console.log(this.options, "options");
    // 有ID直接为ID
    if (options.type) {
      //   this.type = options.type;
    }
  },
  methods: {
    setType1(type) {
      let types = ["default", "success"];
      let index = types.indexOf(this.type1);
      types.splice(index, 1);
      this.type1 = types.join(",");
      this.type2 = "default";
      this.type3 = "default";
    },
    setType2(type) {
      let types = ["default", "success"];
      let index = types.indexOf(this.type2);
      types.splice(index, 1);
      this.type2 = types.join(",");
      this.type1 = "default";
      this.type3 = "default";
    },
    setType3(type) {
      let types = ["default", "success"];
      let index = types.indexOf(this.type3);
      types.splice(index, 1);
      this.type3 = types.join(",");
      this.type2 = "default";
      this.type1 = "default";
    },
  },
};
</script>

<style scoped lang="scss">
/deep/ .uni-easyinput__content {
  border: none;
}
.container {
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 1px; /* 设置文字间距为2像素 */
  .title {
    height: 160px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    color: #000;
    font-weight: 500;
    font-size: 22px;
    width: 100%;
    text-align: center;
    .sub_title {
      font-size: 18px;
      color: #000;
      font-weight: 400;
      margin-top: 15px;
      width: 80%;
    }
  }
  .choose_box {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    width: 93%;

    .item1 {
      padding: 20px 0;
      width: 100%;
      display: flex;
      justify-content: flex-start;
      align-items: flex-start;
      flex-wrap: nowrap;
      border-bottom: 1px solid #e0e3ea;
      position: relative;
      .email_box {
        height: 150px;
        max-height: 350px;
        overflow-y: scroll;
        width: 200px;
        background-color: #f7f7f7;
        position: absolute;
        overflow: auto; /* 保证超出内容能滚动 */
        bottom: -151px;
        left: 105px;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        flex-direction: column;
        line-height: 30px;
        .emit_item {
          width: 100%;
          word-wrap: break-word; /* 兼容性更好的属性 */
          color: #666;
          font-size: 16px;
        }
      }
      .toright {
        position: absolute;
        top: 21px;
        right: 10px;
      }
      .tag_box {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        margin-left: 10px;
        .tag_item {
          margin: 0 8px;
        }
      }
      .right {
        margin-right: 10px;
        margin-left: 10px;
        .type_title {
          color: #000;
          font-weight: 400;
          font-size: 18px;
        }
        .desc {
          margin-top: 10px;
          color: #999;
          font-size: 18px;
          text-align: left;
          width: 256px;
        }
      }
    }
  }
  .btn3 {
    width: 220px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    color: #fff;
    font-size: 18px;
    background-color: #1aad19;
    border-radius: 5px;
    position: fixed;
    left: 25%;
    bottom: 100px;
  }
}
</style>
